package com.etc.service.impl;

import com.etc.dao.RoomDao;
import com.etc.entity.Room;
import com.etc.service.RoomService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class RoomServiceImpl implements RoomService {
    @Resource
    private RoomDao roomDao;
    @Override
    public List<Room> findAllRoom() {
        return roomDao.findAllRoom();
    }

    @Override
    public Room findById(Integer id) {
        return roomDao.findById(id);
    }

    @Override
    public List<Room> findByPark(Integer id) {
        return roomDao.findByPark(id);
    }

    @Override
    public List<Room> findByBuilding(Integer id) {
        return roomDao.findByBuilding(id);
    }

    @Override
    public List<Room> findByOwner(Integer id) {
        return roomDao.findByOwner(id);
    }

    @Override
    public List<Room> findByRoomNum(Integer id) {
        return roomDao.findByRoomNum(id);
    }

    @Override
    public List<Room> findByAnyCondition(Map<String, Object> map) {
        return roomDao.findByAnyCondition(map);
    }

    @Override
    public List<Room> findFreeRoom() {
        return roomDao.findFreeRoom();
    }

    @Override
    public List<Room> findFreeRoomByBuilding(Integer id) {
        return roomDao.findFreeRoomByBuilding(id);
    }

    @Override
    public List<Room> findBusyRoom() {
        return roomDao.findBusyRoom();
    }

    @Override
    public List<Room> findBusyRoomByBuilding(Integer id) {
        return roomDao.findBusyRoomByBuilding(id);
    }
}
